<?php
require_once '../controller.php';
$c = new Course($params->c);
$term = explode(' ',$c->term);
$form = new Form('add_course_form','post');
$form->textInput('id','',array('value'=>$c->id,'class'=>'invisible'));
$form->textInput('title','Course Title',array('tabindex'=>'1','value'=>$c->title));
$form->textInput('term','Course Term',array('tabindex'=>'2','value'=>$term[0]),false);
$form->textInput('year','',array('value'=>date('Y'),'size'=>'5','tabindex'=>'3','value'=>$term[1]),false);
$form->textArea('description','Description (optional)',4,20,array('tabindex'=>'4','value'=>$c->description));
$form->button('modify_course_submit','Modify',array('type'=>'submit','tabindex'=>'5'),false);
$form->button('modify_course_cancel','Cancel',array('type'=>'button','tabindex'=>'6','onclick'=>'closePopup();'),false);
die($form->build());